
<?php include $this->getLayoutFile('block_top_messages'); ?>

<table class="table1" cellspacing="0">
    <tr> 
        <th class="nobg"></th>
        <th> 服務名稱       </th> 
        <th> 服務 key       </th> 
        <th> 服務 id        </th> 
        <th> 管理           </th> 
        <th> 連結到服務前台 </th> 
    </tr>
    <?php

        foreach( $userServices as $serviceKey => $services ) {

            if( ServiceManager::SERVICE_BLOG == $serviceKey ) {

                $blogs = new Blogs();
                foreach( $services as $service ) {
                    $blog = $blogs->getBlog( $service['id'] );
                    $url = $this->url->blog( 'home', $blog );
                    echo '<tr>';
                    echo '    <th></th>';
                    echo     '<td>網誌服務</td>';
                    echo     '<td>'. $serviceKey    .'</td>';
                    echo     '<td>'. $service['id'] .'</td>';
                    echo     '<td>切換到該管理畫面</td>';
                    echo     '<td>';
                    echo        "<a href=\"{$url}\">{$url}</a>";
                    echo     '</td>';
                    echo '</tr>';
                }

            }
            else {
                
                // etc service
                
            }

        }

    ?>
</table> 



